package com.woniu.demo.Api;



import com.moneywelcome.results.Result;
import com.woniu.demo.Dto.UserInfoDto;
import com.woniu.demo.param.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
@Api(tags = "用户服务")
@FeignClient("user-service")
public interface UserApi {

    @ApiOperation("手机号注册")
    @PostMapping("/register")
     Result register(@RequestBody PhoneRegisterParam phoneRegisterParam);


    @ApiOperation("账号密码登录")
    @PostMapping("/Login")
     Result accLogin(@RequestBody UserAccountLoginParam userAccountLoginParam);

    //验证码登录
    @ApiOperation("验证码登录接口")
    @PostMapping("/phoneLogin")
     Result phoneLogin(@RequestBody PhoneLoginParam phoneLoginParam);

    //验证码登录
    @ApiOperation("发送验证码接口")
    @GetMapping("/sendcode/{phone}")
    Result phonesetcode(@PathVariable("phone") String phone);

    //添加账号信息
//    @ApiOperation("添加账号信息接口")
//    @GetMapping("/addUser/{userAccount}")
//    public Result addUser(@PathVariable("userAccount") String userAccount);


    //删除账号信息
    @ApiOperation("删除账号信息接口")
    @GetMapping("/remUser/{ids}")
     Result remUser(@PathVariable("ids") List<Integer> ids);



    //修改账号信息
    @ApiOperation("修改账号信息接口")
    @PostMapping("/updateUser")
     Result updateUser(@RequestBody UpdateUserParam updateUserParam);


    //后台查询账号信息
    @ApiOperation("分页多条件查询账号信息接口")
    @PostMapping("/selUser")
    Result selUser(@RequestBody PageFindUserParam pageFindUserParam);

    //用户修改账号信息
    @ApiOperation("忘记密码")
    @PostMapping("/updatePassword")
    Result updateUser(@RequestBody UpdatePasswordParam updatePasswordParam);

    //查询个人信息
    @ApiOperation("分页多条件查询个人信息接口")
    @PostMapping("/selUserInfo/{userId}")
    Result<UserInfoDto> selUserinfo(@PathVariable("userId") Integer userId);

}
